import React from 'react'
import Toiteam from '../Toiteam/Toiteam'
import "./Tomain.css"
export default function Tomain(props) {
  let{connet,deltitle,changeval,gettype}=props

  return (
    <ul className="todo-main">
      {/* {
        connet.map((iteam,index)=>{
          return <Toiteam index={index} deltitle={deltitle} updatatitle={updatatitle} gettype={gettype}   iteam ={iteam} key={iteam.id} />
        })
      } */}

   {/* { connet.length ===0 &&  <li className='todo-empty'>暂无东西吃！</li>} */}
   
   {
    connet.map((iteam,index)=>{
   return   <Toiteam deltitle={deltitle} changeval={changeval} key={iteam.id} iteam={iteam} connet={connet}></Toiteam>
    })
   }

  </ul>
  )
}
